<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.org">
<head th:replace="decorator :: common_header(~{::'title/text()'},~{::customHead})">
    <title>商品管理</title>

    <!--/*/ <th:block th:fragment="customHead" > /*/-->
    <script src="lib/adminLTE/plugins/jQuery/jquery-2.2.3.min.js"></script>
    <link rel="stylesheet" type="text/css"
          href="lib/adminLTE/plugins/datatable/media/css/dataTables.bootstrap.min.css"/>

    <link rel="stylesheet" type="text/css"
          href="lib/adminLTE/plugins/datatable/extensions/Buttons/css/buttons.dataTables.min.css"/>
    <link rel="stylesheet" type="text/css"
          href="lib/adminLTE/plugins/datatable/extensions/Buttons/css/buttons.bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css"
          href="lib/adminLTE/plugins/datatable/extensions/Select/css/select.dataTables.min.css"/>
    <link rel="stylesheet" type="text/css"
          href="lib/adminLTE/plugins/datatable/extensions/Select/css/select.bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css"
          href="lib/adminLTE/plugins/dualListbox/bootstrap-duallistbox.min.css"/>
    <link rel="stylesheet" type="text/css"
          href="lib/dialog/bootstrap-dialog.min.css"/>
    <link rel="stylesheet" type="text/css"
          href="lib/adminLTE/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css"/>
    <link rel="stylesheet" type="text/css"
          href="lib/adminLTE/bootstrap-select/css/bootstrap-select.css"/>
    <!--    <link rel="stylesheet" type="text/css"
              href="lib/adminLTE/bootstrap/css/bootstrap.min.css"/>-->
</head>
<body th:replace="decorator :: common_body(~{::mainBody},~{::tailScript})">

<!-- 原型注释  -->
<!--/*/ <th:block th:fragment="mainBody" >  /*/-->

<div class="box box-primary search-box">
    <div class="box-header with-border">
        <h3 class="box-title">商品搜索</h3>
        <div class="box-tools pull-right">

        </div>
        <!-- /.box-tools -->
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <form class="search-form" action="goodsManage/getGoodsList">
            <input type="text" style="display: none"/>
            <div class="row">
                <div class="col-md-3"></div>

                <div class="col-md-2">
                    <div class="form-group">
                        <label for="names">商品名字:</label>
                        <input id="names" name="name" type="text" placeholder="商品名字"
                               class="form-control field"/>
                    </div>
                </div>
                <div class="col-md-2">
                    <div class="form-group">
                        <label for="bname">所属商店:</label>
                        <input id="bname" name="bname" type="text" placeholder="所属商店"
                               class="form-control field"/>
                    </div>
                </div>
                <div class="col-md-2">
                    <div class="form-group">
                        <label for="mname">所属类别:</label>
                        <input id="mname" name="mname" type="text" placeholder="所属类别"
                               class="form-control field"/>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-4"></div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <button id="goodsSearchBtn" type="button"
                                    class="btn btn-primary btn-block btn-flat search-btn">搜索
                            </button>
                        </div>
                    </div>
                    <div class="col-md-4"></div>
                </div>
        </form>
    </div>
    <!-- /.box-body -->
</div>
<!-- /.box -->
<div class="box box-primary table-box hidden">
    <div class="box-header with-border">
        <h3 class="box-title">商品管理</h3>
        <div class="box-tools pull-right">

        </div>
        <!-- /.box-tools -->
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <table class="table table-bordered table-hover data-view" width="100%">
            <thead>
            <tr>
                <th class="text-center text-nowrap">商品id</th>
                <th class="text-center text-nowrap">所属商店</th>
                <th class="text-center text-nowrap">所属类别</th>
                <th class="text-center text-nowrap">名字</th>
                <th class="text-center text-nowrap">折扣价</th>

                <th class="text-center text-nowrap">真实价格</th>
                <th class="text-center text-nowrap">数量</th>
                <th class="text-center text-nowrap">描述</th>
                <th class="text-center text-nowrap">信誉度</th>
                <th class="text-center text-nowrap">是否推荐</th>

                <th class="text-center text-nowrap">状态</th>
            </tr>
            </thead>
            <tbody></tbody>
            <tfoot>
            <tr>
                <th class="text-center text-nowrap">商品id</th>
                <th class="text-center text-nowrap">所属商店</th>
                <th class="text-center text-nowrap">所属类别</th>
                <th class="text-center text-nowrap">名字</th>
                <th class="text-center text-nowrap">折扣价</th>

                <th class="text-center text-nowrap">真实价格</th>
                <th class="text-center text-nowrap">数量</th>
                <th class="text-center text-nowrap">描述</th>
                <th class="text-center text-nowrap">信誉度</th>
                <th class="text-center text-nowrap">是否推荐</th>

                <th class="text-center text-nowrap">状态</th>
            </tr>
            </tfoot>
        </table>
    </div>
    <!-- /.box-body -->
</div>
<!-- /.box -->
<!--更新模态框开始-->
<div class="modal fade edit-dialog update" role="dialog" aria-labelledby="编辑对话框">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">商品修改</h4>
            </div>
            <div class="modal-body">
                <form action="goodsManage/updateGoods" id="editForm" class="form-edit update" method="post">
                    <input type="text" style="display: none"/>
                    <!--<input id="id" name="id" type="text" style="display: none"/>-->
                    <div class="form-group">
                        <label class="control-label" for="id"><i class="fa"></i>id</label>
                        <input id="id" name="id" type="text" readonly unselectable="on"
                               class="form-control search-key" placeholder="id">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="bid1"><i class="fa"></i>所属商店</label>
                        <select id="bid1" name="bid" class="selectpicker show-tick form-control">

                        </select>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="mid1"><i class="fa"></i>所属类别</label>
                        <select id="mid1" name="mid" class="selectpicker show-tick form-control">

                        </select>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="name1"><i class="fa"></i>名字</label>
                        <input id="name1" name="name" type="text" unselectable="on"
                               class="form-control search-key" placeholder="名字">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="price1"><i class="fa"></i>折扣价</label>
                        <input id="price1" name="price" type="text" unselectable="on"
                               class="form-control search-key" placeholder="折扣价">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="realPrice1"><i class="fa"></i>真实价</label>
                        <input id="realPrice1" name="realPrice" type="text" unselectable="on"
                               class="form-control search-key" placeholder="真实价">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="sum1"><i class="fa"></i>数量</label>
                        <input id="sum1" name="sum" type="text" unselectable="on"
                               class="form-control search-key" placeholder="数量">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="description1"><i class="fa"></i>描述</label>
                        <input id="description1" name="description" type="text" unselectable="on"
                               class="form-control search-key" placeholder="描述">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="credit1"><i class="fa"></i>信誉度</label>
                        <input id="credit1" name="credit" type="text" unselectable="on"
                               class="form-control search-key" placeholder="数量">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="isGroom1"><i class="fa"></i>是否推荐</label>
                        <select id="isGroom1" name="isGroom" class="selectpicker show-tick form-control">
                            <option value="NO">不推荐</option>
                            <option value="YES">推荐</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="status1"><i class="fa"></i>状态</label>
                        <select id="status1" name="status" class="selectpicker show-tick form-control">
                            <option value="USE">可用</option>
                            <option value="NOT_USE">不可用</option>
                        </select>
                    </div>
                    <span class="help-block"></span>


                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
                <button type="button" id="goodsEditBtn" class="btn btn-primary submit">提交</button>
            </div>
        </div>
    </div>
</div>
<!--更新模态框结束-->

<!--增加模态框开始-->
<div class="modal fade edit-dialog add" role="dialog" aria-labelledby="编辑对话框">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">购物记录增加</h4>
            </div>
            <div class="modal-body">
                <form action="goodsManage/saveGoods" id="addForm" class="form-edit add" method="post">
                    <input type="text" style="display: none"/>
                    <!--<input id="id" name="id" type="text" style="display: none"/>-->

                    <div class="form-group">
                        <label class="control-label" for="bid"><i class="fa"></i>所属商店</label>
                        <select id="bid" name="bid" class="selectpicker show-tick form-control">

                        </select>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="mid"><i class="fa"></i>所属类别</label>
                        <select id="mid" name="mid" class="selectpicker show-tick form-control">

                        </select>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="name"><i class="fa"></i>名字</label>
                        <input id="name" name="name" type="text" unselectable="on"
                               class="form-control search-key" placeholder="名字">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="price"><i class="fa"></i>折扣价</label>
                        <input id="price" name="price" type="text" unselectable="on"
                               class="form-control search-key" placeholder="折扣价">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="realPrice"><i class="fa"></i>真实价</label>
                        <input id="realPrice" name="realPrice" type="text" unselectable="on"
                               class="form-control search-key" placeholder="真实价">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="sum"><i class="fa"></i>数量</label>
                        <input id="sum" name="sum" type="text" unselectable="on"
                               class="form-control search-key" placeholder="数量">
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="description"><i class="fa"></i>描述</label>
                        <input id="description" name="description" type="text" unselectable="on"
                               class="form-control search-key" placeholder="描述">
                    </div>
                    <!--<div class="form-group">
                        <label class="control-label" for="credit"><i class="fa"></i>信誉度</label>
                        <input id="credit" name="credit" type="text" unselectable="on"
                               class="form-control search-key" placeholder="数量">
                    </div>-->
                    <div class="form-group">
                        <label class="control-label" for="isGroom"><i class="fa"></i>是否推荐</label>
                        <select id="isGroom" name="isGroom" class="selectpicker show-tick form-control">
                            <option value="NO">不推荐</option>
                            <option value="YES">推荐</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="status"><i class="fa"></i>状态</label>
                        <select id="status" name="status" class="selectpicker show-tick form-control">
                            <option value="USE">可用</option>
                            <option value="NOT_USE">不可用</option>
                        </select>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary submit">提交</button>
            </div>
        </div>
    </div>
</div>
<!--增加模态框结束-->
<!--/*/ </th:block > /*/-->

<!-- 原型注释  -->
<!--/*/ <th:block th:fragment="tailScript" > /*/-->
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/media/js/jquery.dataTables.min.js"
></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/media/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/extensions/Buttons/js/dataTables.buttons.min.js"></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/extensions/Buttons/js/buttons.bootstrap.min.js"></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/extensions/Buttons/js/buttons.html5.min.js"></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/datatable/extensions/Select/js/dataTables.select.min.js"></script>
<script type="text/javascript"
        src="lib/adminLTE/plugins/dualListbox/jquery.bootstrap-duallistbox.min.js"></script>
<script type="text/javascript"
        src="lib/dialog/bootstrap-dialog.min.js"></script>
<script type="text/javascript" src="lib/adminLTE/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="lib/adminLTE/bootstrap-select/js/bootstrap-select.js"></script>
<!--<script type="text/javascript" src="lib/adminLTE/bootstrap/js/bootstrap.min.js"></script>-->
<!-- 自定义脚本开始 -->
<script type="text/javascript" src="js/util/commonUtils.js"></script>
<script type="text/javascript" src="js/goods/goodsManage.js"></script>
<script type="text/javascript" src="js/util/alertResult.js"></script>
<!--/*/ </th:block>  /*/-->
</body>
</html>